﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;


namespace 药品信息管理
{
    public partial class YP_RZPZ_MX : Form
    {
        public YP_RZPZ_MX()
        {
            InitializeComponent();
        }

        public string fph;

        private void YP_RZPZ_MX_Load(object sender, EventArgs e)
        {
            SqlConnection conn = new SqlConnection(SQL.conStr);
            DataTable dt = new DataTable();

            string str = @"SELECT ,convert(datetime,FPRQ-2) 发票日期,FPH 发票号,RKDS 入库单数,FPJE 购入金额,LJJE 零价金额 FROM YK_FP0 FP";
            SqlDataAdapter da = new SqlDataAdapter(str, conn);
            da.Fill(dt);
            dataGridViewX2.DataSource = dt;

        }

        private void dataGridViewX2_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {

            textBoxItem1_ypqldcx.Text = Convert.ToString(dataGridView1_ypqldcx[0, dataGridView1_ypqldcx.CurrentCell.RowIndex].Value).Trim();
        }
    }
}